# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-nashpy
_pkgorig=nashpy
pkgver=0.0.40
pkgrel=1
pkgdesc="A library for the computation of Nash equilibria in two player games"
url="https://github.com/drvinceknight/Nashpy"
arch="noarch"
license="MIT"
depends="python3 py3-deprecated py3-scipy py3-networkx py3-numpy"
checkdepends="py3-pytest-xdist py3-hypothesis"
makedepends="py3-gpep517 py3-flit-core"
subpackages="$pkgname-pyc"
source="https://github.com/drvinceknight/Nashpy/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/Nashpy-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	PYTHONPATH=src \
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/nashpy-$pkgver-py3-none-any.whl
}

sha512sums="
4c3cfc1c416273d1b2a2afdd926b608e0eea87b67577b1f46212daea91de6a02fd428f417e5126254249e3aff19fc5219df544dda3b67dd1a64fef9283201093  nashpy-0.0.40.tar.gz
"
